import {createStore,combineReducers, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { composeWithDevTools } from "@redux-devtools/extension";


import login from './modules/login'
import register from './modules/register'
import home from './modules/home'
import detail from './modules/detail'
import cate from './modules/cate';
import shop from './modules/shop';

//根reducer
const reducer = combineReducers({
    //模块
    login,
    register,
    home,
    detail,
    cate,
    shop
})
//创建仓库
const store = createStore(reducer, composeWithDevTools(applyMiddleware(thunk)))
//导出仓库
export default store;